<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/10 010
 * Time: 16:45
 */

namespace App\Http\Controllers;

use App\Beverage\Beverage;
use App\Beverage\DarkRoast;
use App\Beverage\Espresso;
use App\Beverage\HouseBlend;
use App\Beverage\Mocha;
use App\Beverage\Whip;
use App\Beverage\Soy;

class StarbuzzCoffeeController
{
    public function index()
    {
        $beverage = new Espresso();
        echo($beverage->getDescription() . " $" . $beverage->cost()."<br />");

        $beverage2 = new DarkRoast();
        $beverage2 = new Mocha($beverage2);
        $beverage2 = new Mocha($beverage2);
        $beverage2 = new Whip($beverage2);
        echo($beverage2->getDescription() . " $" . $beverage2->cost()."<br />");

        $beverage3 = new HouseBlend();
        $beverage3->setSize(Beverage::TALL);
        $beverage3 = new Soy($beverage3);
        $beverage3 = new Mocha($beverage3);
        $beverage3 = new Whip($beverage3);
        echo($beverage3->getDescription() . " $" . $beverage3->cost()."<br />");
    }
}